﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common.Data.Repository;
using DataCenter.Data.DataContextStorage;
using DataCenter.Model.Model;

namespace DataCenter.Data.Repository
{
    public class DataCenterRepository : GenericRepository
    {
        public DataCenterRepository()
            : base(DataContextFactory.GetDataContext())
        {

        }
        private static DataCenterRepository _current = null;
        public static DataCenterRepository Current
        {
            get
            {
                return new DataCenterRepository();
            }
        }

        public DbSet<DataCenters> DataCenters
        {
            get
            {
                return ((DataCenterEntities)this.DbContext).DataCenters;
            }
        }

        public DbSet<Province> Provinces { get { return ((DataCenterEntities)this.DbContext).Provinces; } }
        public DbSet<District> Districts { get { return ((DataCenterEntities)this.DbContext).Districts; } }
        public DbSet<ModelCat> ModelCat { get { return ((DataCenterEntities)this.DbContext).ModelCat; } }
        public DbSet<Region> Regions { get { return ((DataCenterEntities)this.DbContext).Regions; } }
        public DbSet<OrderInfo> Orders { get { return ((DataCenterEntities)this.DbContext).Orders; } }
        public DbSet<ShopInf> ShopInf { get { return ((DataCenterEntities)this.DbContext).ShopInf; } }
        public DbSet<ShopBillto> ShopBillto { get { return ((DataCenterEntities)this.DbContext).ShopBillto; } }
        public DbSet<BilltoInf> BilltoInf { get { return ((DataCenterEntities)this.DbContext).BilltoInf; } }
        public DbSet<Organization> Oragnizations { get { return ((DataCenterEntities)this.DbContext).Organizations; } }
        public DbSet<ResponseSMS> ResponseSMS { get { return ((DataCenterEntities)this.DbContext).ResponseSMSs; } }
        //public DbSet<OrderShipHist> OrderShipHIst { get { return ((DataCenterEntities)this.DbContext).OrderShipHist; } }
        public DbSet<SerialNumberCdcHist> SerialNumberCdcHist { get { return ((DataCenterEntities)this.DbContext).SerialNumberCdcHistory; } }
        public DbSet<SerialNumberRdcHist> SerialNumberRdcHist { get { return ((DataCenterEntities)this.DbContext).SerialNumberRdcHistory; } }
        public DbSet<SerialNumberPndHist> SerialNumberPndHist { get { return ((DataCenterEntities)this.DbContext).SerialNumberPndHist; } }
        public DbSet<WarrantyMaster> WarrantyMaster { get { return ((DataCenterEntities)this.DbContext).WarrantyMaster; } }
        public DbSet<WarrantyMessage> WarrantyMessage { get { return ((DataCenterEntities)this.DbContext).WarrantyMessage; } }
        public DbSet<WarrantyHistory> WarrantyHistory { get { return ((DataCenterEntities)this.DbContext).WarrantyHistory; } }
        public DbSet<MessageHistory> MessageHistory { get { return ((DataCenterEntities)this.DbContext).MessageHistory; } }
        public DbSet<MessageSend> MessageSend { get { return ((DataCenterEntities)this.DbContext).MessageSend; } }
        public DbSet<MRP> Mrp { get { return ((DataCenterEntities)this.DbContext).Mrp; } }
    }
}
